def t1211():
  """Strategy t121: """
  SetDayOfWeek(Days.Monday)
  raw_input("Restart UniversalRoutingServer, StatServer and Tserver")
  OpenServers()
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t121")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()

def t1212():
  """Strategy t121: """
  SetDayOfWeek(Days.Friday)
  raw_input("Restart UniversalRoutingServer, StatServer and Tserver")
  OpenServers()
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t121")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()  
  
def t1213():
  """Strategy t121a: """
  SetDayOfWeek(Days.Monday)
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t121a")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack() 

  
def t1214():
  """Strategy t121a: """
  SetDayOfWeek(Days.Sunday)
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t121a")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()     
  
def t1221():
  """Strategy t122: """
  SetDate(1998, 1, 2)
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t122")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()      
  
def t1222():
  """Strategy t1222: """
  SetDate(1998, 1, 2)
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t1222")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")

  time.sleep(5)
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")

  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()    
  
def t1223():
  """Strategy t1223: """
  SetDate(1998, 1, 2)
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t1223")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN12.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()  
  
def t1224():
  """Strategy t1224: """
  SetDate(1998, 1, 2)
  initConfig()
  CfgCDN1.LoadStrategy(CfgRouter, "t1224")
  LocalTserver.MakeCall(DN10.number, CDN1.numberForCall)
  LocalTserver.Wait(DN10.number)
  receiver = LocalTserver.AnswerOnAlertingDN([DN1.number, DN2.number, DN3.number, DN4.number,
    DN12.number], timeout = 30)
  time.sleep(2) #Agent is talking
  LocalTserver.ReleaseCall(DN10.number)
  LocalTserver.Wait()
  UniversalRoutingServer.TestValue(receiver, DN1.number, "Call was delivered to the wrong destination")
  CfgCDN1.UnloadStrategy(CfgRouter)   
  SetSystemTimeBack()                                         